---
- name: Ensure tmux conf dir exists
  ansible.builtin.file:
    path: "{{ tmux_conf_dir }}"
    state: directory

- name: Link tmux conf
  ansible.builtin.file:
    src: "{{ tmux_src_dir }}/tmux.conf"
    dest: "{{ tmux_conf_dir }}/tmux.conf"
    state: link

- name: Ensure tmux plugins dir exists
  ansible.builtin.file:
    path: "{{ tmux_plugins_dir }}"
    state: directory

- name: Add tmux TPM
  ansible.builtin.git:
    repo: git@github.com:tmux-plugins/tpm
    dest: "{{ tmux_plugins_dir }}/tpm"
    depth: 1
    force: true

- name: Link tmux macos.conf
  ansible.builtin.file:
    src: "{{ tmux_src_dir }}/macos.conf"
    dest: "{{ tmux_conf_dir }}/macos.conf"
    state: link

- name: Link tmux theme.tmux
  ansible.builtin.file:
    src: "{{ tmux_src_dir }}/theme.tmux"
    dest: "{{ tmux_conf_dir }}/theme.tmux"
    state: link
